<style>
.pay_item{height:40px;line-height:40px;border:1px solid #ccc;margin:10px;border-radius:5px;padding:5px 0px 5px 15px;}
.pay_item img{height:32px;width:33px;margin-right:15px;}
.pay_active{background-color:#eee;}
</style>
<!-- 付款 start -->
<script type="text/j-template" id="J-pay" >
    <section class="addurl_con" style="z-index:100">
        <section class="msettlement_tpay">
            <div class="pay_item pay_active" data-val="2">
                账户余额：<span style="color:#e4393c">0.00</span>元
            </div>
            <div class="pay_item" data-val="1">
				<img src="statics/mobile/images/alipay.png"/> 支付宝-在系统自带浏览器中使用

            </div>
            <div class="pay_item" data-val="3">
                <img src="statics/mobile/images/wxpay.png"/> 微信支付-在微信中使用
            </div>
            <div class="paymethodnote"></div>
        </section>
        <section class="mlogin_but"><a href="javascript:;" class="J-okPay" data-payType="1">确定</a></section>
        <section class="mlogin_but" style="margin-top:10px;"><a class="call J-call" href="javascript:;">取消</a></section>
    </section>
</script>
<!-- 付款 end -->

<!-- 会员下单后悬浮提示访客 -->
<script type="text/j-template" id="tpl_tip_visitors">
    <section class="tip_visitors" id="tip_vi">
        <img src="<%= data.headimgurl %>"/>
        <p>
            <% if(data.type == 1) {%>
                最新订单来自
            <% } else { %>
                最新评价来自
            <% } %>
            <span class="textFlow"><%= data.nickname %></span>，<%= data.time %>之前
        </p>
    </section>
</script>

<!-- 商品订单下单弹窗 -->
<section class="j-close-popupSKU" id="overlay"></section>
<form action="/Order/buy/type/onbuy" method="post" id="order_form" class="formReplace">
    <b class="staticAjaxReplace" id="staticAjaxReplace-formHidden"></b>
    <b class="staticAjaxReplace" id="staticAjaxReplace-popupSku"></b>
</form>

<section class="loading" id="j-loading"></section>


<!-- 悬浮按钮 -->
<div class="mask_menu" id="menubtn" style="display: none;"></div>
<div class="menu" id="menufloat"><i class="icon-menu"></i></div>
<div class="menu-c notel nofocus" id="menufloat-c" style="">
    <div class="menu-c-out">
        <div class="menu-c-inner">
            <a class="a-home" href="<?php echo url('','',array('wxapp'=>'/pages/index/index','shopid'=>$GLOBALS['store_id']),'mobile');?>" title="首页" style="display: block;"></a>
            <a class="a-tel" href="tel://" title="联系店主" style="display: inline;"></a>
            <a class="a-member" href="?act=cart&wxapp=/pages/shoppingcar/index" title="购物车" style="display: block;"></a>
            <a class="a-search" href="?act=user&wxapp=/pages/user/index" title="会员" style="display: block;"></a>
            <a class="a-cart" href="javascript:;" id="share-link" title="分享" style="display: block;"></a>
            <a class="a-collect" href="javascript:void(0)" id="collect-link" title="收藏" style="display: block;"></a>
            <a class="a-server" href="?act=goods" title="搜索" style="display: block;"></a>
        </div>
    </div>
</div>
<!--未支付订单弹窗-->
<div class="dashArea" id="dashArea" style="display: none;">
    <div class="order_box">
        <div class="order_bg"><img src="statics/mobile/images/dash_bg.png"/></div>
        <div class="order_detail">
            <div class="order_img"></div>
            <div class="order_title"></div>
            <div class="order_hint">
                <p>未支付的订单将在不久后自动关闭</p>
                <p>请尽快支付</p>

                <div class="spinner">
                    <span class="bounce bounce1"></span>
                    <span class="bounce bounce2"></span>
                    <span class="bounce bounce3"></span>
                </div>
            </div>
            <ul>
                <a class="pay-close" href="javascript:void(0)"><li class="btn_l">知道了</li></a>
                <a class="pay-enter" href="javascript:void(0)"><li class="btn_r">继续支付</li></a>
            </ul>
        </div>
    </div>
</div>
<script type="text/j-template" id="tpl_userCenter">
    <section id="userCenter-overlay" class="bdbox">
        <div class="uc-info clearfix">
            <div class="uc-info-avatar fl" style="background-image:url(<%=avatar%>);"></div>
            <div class="uc-info-meta-panel fl">
                <div class="uc-info-meta name j-uc-name"><%=nickname%></div>
                <%if(show_id){%>
                    <div class="uc-info-meta userid"><%= uid %></div>
                <%}%>
                <div class="uc-info-meta phone"><%=phone%></div>
            </div>
        </div>

        <ul class="uc-data clearfix">
            <li class="bdbox">
                <a href="javascript:;" data-url="<%=url_wait_total%>"><i><%=wait_total%></i><p><%=ftitle_pending_pay%></p></a>
            </li>
            <li class="bdbox">
                <a href="javascript:;" data-url="<%=url_pay_total%>"><i><%=pay_total%></i><p><%=ftitle_have_pay%></p></a>
            </li>
            <li class="bdbox">
                <a href="javascript:;" data-url="<%=url_send_total%>"><i><%=send_total%></i><p><%=ftitle_has_shipped%></p></a>
            </li>
            <li class="bdbox">
                <a href="javascript:;" data-url="<%=url_return_total%>"><i><%=return_total%></i><p><%=ftitle_return_goods%></p></a>
            </li>
        </ul>

        <ul class="uc-link">
            <li><a href="javascript:;" data-url="<%=url_allorder%>" class="icon_allorder">全部订单<span></span></a></li>
            <%if(show_myCommission){%>
                <li><a href="javascript:;" data-url="<%=url_wdyj%>" class="icon_wdyj"><%=ftitle_commission%><span></span></a></li>
            <%}%>
            <%if(show_point){%>
                <li><a href="javascript:;" data-url="<%=url_jf%>" class="icon_jf"><%=ftitle_point%><span></span></a></li>
            <%}%>
            <%if(show_coupon){%>
                <li><a href="javascript:;" data-url="<%=url_yhq%>" data-type="plugin" class="icon_yhq"><%=ftitle_coupon%><span></span></a></li>
            <%}%>
            <%if(show_interaction){%>
                <li><a href="javascript:;" data-url="<%=url_hyhd%>" data-type="plugin" class="icon_hyhd"><%=ftitle_game%><span></span></a></li>
            <%}%>
        </ul>

        <div class="uc-actions clearfix">
            <a href="javascript:;" class="btn-back fl" id="btn-close-uc">返回</a>
            <a href="javascript:;" data-url="?act=user&wxapp=/pages/user/index" class="btn-enter fr">进入</a>
        </div>
    </section>
</script>

<!-- 会员中心浮层 -->
<section id="userCenter-overlay-close"></section>
<a href="javascript:;" id="userCenter-btn"></a>

<div id="mmexport"><img src="statics/mobile/images/mmexport.png" width="100%" alt=""></div>
<div id="mmexport-pl" style="display: none;"><img src="statics/mobile/images/mmexport1.png" width="100%" alt=""></div>
<div id="mmexport-share" style="display: none;"><img src="statics/mobile/images/mmexport2.png" width="100%" alt=""></div>
<div id="mmexport-share-res" style="display: none;">
    <div class="share_res">
        <div class="share-res-top"><img src="statics/mobile/images/draw.png" width="27px">分享成功</div>
        <p class="p1">分享3次以上,有好货岂能私藏！</p>
        <div id="share-again" class="share-btn">继续分享</div>
        <div class="share_line"><p>好货提示</p></div>
        <p class="p2">90%的人在这发现了心仪好货</p>
        <a href=""><div class="share-btn share-btn2">前往店铺首页</div></a>
        <span class="mmexport-share-close">×</span>
    </div>
</div>
<div id="show_qrcode"><div class="code_box"><section style="text-align:center"><img src="" alt="" class="qrcode"><p>长按二维码关注公众号</p></section></div></div>

<!--一键关注-->
<!-- 收藏 -->
<div class="collectbg"><img src="statics/mobile/images/collectbg.png" width="100%" alt=""><a href="javascript:;" class="a-know">我知道了</a></div>
<!-- 分享 -->
<div class="sharebg"><img src="statics/mobile/images/mmexport.png" width="100%" alt=""><a href="javascript:;" class="a-know">我知道了</a></div>
<!--微信提示-->
<div id="popup-protocol-overlay"></div>
<div class="open-in-browser"></div>
<div id="popup-protocol">
  <button class="popup-protocol-btn download">下载</button><div class="popup-protocol-tip">点击分享</div>
  <div class="popup-protocol-close"></div>
  <div class="j-openProtocol"></div>
</div>
<!--
<div id="j-appdown-autohide"></div>
<div id="j-openUrlInApp" style="margin-bottom:100px;">test</div>
-->

<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<input type="hidden" name="latitude"><input type="hidden" name="longitude">
<script src="statics/mobile/js/dist/lib-min.js?v=2016102404"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=rssoUTP7ydqWlW5lbAsyzIa6&s=1"></script>
<script type="text/javascript">
	var source="<?php echo isset($_GET['source'])?$_GET['source']:'mobile';?>";
	var bidcmsData=<?php echo json_encode($bidcms_data);?>;
	var Fenbot_sendDefaultApiInfo=true;//传输默认的用户数据到微聊
    var global_is_preview='1';
    var global_spsBtn_isShow=true;//是否显示按钮
    var global_cart_isShow=true;//是否显示购物车
    var global_cartPageUrl="?act=car";//购物车页面地址
    var global_cartAjaxUrl="?con=shop&act=getCartNum";//购物车数据请求地址
    var global_appdown_isShow=false;//是否显示app下载顶部条
    var global_appdown_autoHideTime="";//app下载顶部条自动隐藏时间
    var global_showcr='';
    var global_wechat_getWxConfigUrl="?con=shop&act=getWxConfig";
	var global_baidu_mapUrl="//api.map.baidu.com/geocoder/v2/?callback=renderReverse&output=json&pois=1&ak=g1kBfIDGLF4xwNR5FXmyQmI4&location=39.934,116.329";
	var global_baidu_posUrl="https://api.map.baidu.com/location/ip?ak=g1kBfIDGLF4xwNR5FXmyQmI4&coor=bd09ll";
    var global_wechat_debug=false;
    var selfShareHandle=false;
    var isShowOrderTip = "";//是否显示下单提示
    var htmlData=null;
	var global_sid='<?php echo $GLOBALS["store_id"];?>';
	var global_pid='<?php echo $GLOBALS["pid"];?>';
	
    //会员中心浮层其它数据
    var userCenter_data={
        url_wait_total:"?con=order&wxapp="+escape('/pages/order/index?status=0')+"&status=0",
        url_pay_total:"?con=order&wxapp="+escape('/pages/order/index?status=1')+"&status=1",
        url_send_total:"?con=order&wxapp="+escape('/pages/order/index?status=2')+"&status=2",
        url_return_total:"?con=order&wxapp="+escape('/pages/order/index?status=-4')+"&status=-4",
        url_allorder:"?con=order&status=all&wxapp=/pages/order/index",
        url_wdyj:"?con=agent&act=commission",
        url_jf:"?con=user&act=points",
        url_yhq:"//shop.bidcms.com/plugins/discount/index.php",
        url_hyhd:"//shop.bidcms.com/plugins/activity/index.php"
    };
   
    // 关闭弹框
    $(document).on("click",".fm_Closes_Del",function(){
        $(".fm_live").css("display","none");
    });
    // 详情页是否显示二维码方法
    var isshowcode=function(){};
    // 是否是微信端
    var global_wechat_isInWexin="";
    var point_name = "积分";
	var geolocation = new BMap.Geolocation();
</script>
<!-- end -->
<script src="statics/mobile/js/dist/diy-min.js?v=2016102404"></script>
<script src="statics/mobile/js/dist/cbb_jssdk.js?v=2016102701"></script>
<script src="statics/mobile/js/dist/Public/selectGoodsAddCart.js?v=2016102701"></script>

<script src="statics/mobile/plugins/layzr/layzr.min.js?v=2016102701"></script>
<script src="statics/mobile/plugins/swiper/swiper.min.js"></script>
<script src="statics/mobile/plugins/jquery/weixinAudio.js"></script>

<script src="statics/mobile/js/dist/main.js?v=2016102701"></script>
<script type="text/javascript">
<!--
$(document).ready(function(){
	var swiper = new Swiper('.swiper-container', {
		pagination: '.swiper-pagination',
		paginationClickable: true,
		autoplay : 5000,
	});
	var swiper1 = new Swiper('.swiper-container1', {
      slidesPerView: 4,
      spaceBetween: 5
    });
	var weixinAudioObj=$('.weixinAudio').weixinAudio();
	// 添加单一播放的逻辑
	$('.weixinAudio').on('click',function(event) {
		var $this = $(this);
		var currentIndex = $this.index();
		// 遍历所有对象，找到非当前点击，执行pause()方法;
		$.each(weixinAudioObj,function(i, el) {
			if(i != 'weixinAudio'+currentIndex){
				el.pause();
			}
		});
	});
	
});
$("body").on('click','a',function(){
	var userAgent = navigator.userAgent.toLowerCase();
	var url=$(this).data('url')?$(this).data('url'):$(this).attr('href');
	if(userAgent.indexOf('miniprogram')>0 || userAgent.indexOf('wechatdevtools')>0){
		var wxUrl=GetQueryString('wxapp',url);
		if(wxUrl){
			var open_type=$(this).data('type') || 'navigate';
			if('reLaunch'==open_type){
				wx.miniProgram.reLaunch({
					url:unescape(wxUrl)
				});
			} else if('redirectTo'==open_type){
				wx.miniProgram.redirectTo({
					url:unescape(wxUrl)
				});
			} else {
				wx.miniProgram.navigateTo({
				  url:unescape(wxUrl)
				});
			}
			return false;
		}
	}
	if(url && url!='#' && url.indexOf('javascript:')<0){
		var t=url.indexOf('?')>-1?'&':'?';
		url=url+t+'source='+source+'&shopid='+global_sid+'&pid='+global_pid;
		window.location.href=url;
	}
});

//-->
</script>
